﻿@model PageVM

@{
    ViewData["Title"] = "Discover run";
    if (ViewData["Nickname"] != null)
    {
        ViewData["Title"] = ViewData["Nickname"] + " run";
    }

    var rows = Model.Rows as List<Netnr.Domain.Run>;    
}

<partial name="_PartialNav" />

<div class="container-fluid">
    <div class="row">
        <div class="col mt-4">
            <p>We’ve found <b>@Model.Pag.Total.ToString("N0")</b> results</p>
        </div>
    </div>
    <div class="row rld">
        @foreach (var item in rows)
        {
            <div class="col-md-6 col-sm-12">
                <div class="card border-secondary mb-4">
                    <div class="card-body text-secondary">
                        <iframe src="/run/code/@item.RunCode?pure=1" allowfullscreen="allowfullscreen" frameborder="0" scrolling="no" sandbox="allow-forms allow-popups allow-scripts allow-same-origin"></iframe>
                        <div class="rldc">
                            <a href="/run/code/@item.RunCode/edit" title="edit"><i class="fa fa-edit"></i></a>
                            <a href="/run/code/@item.RunCode" title="see"><i class="fa fa-eye"></i></a>
                        </div>
                    </div>
                    <div class="card-footer bg-transparent border-secondary">
                        <i class="fa fa-user text-muted"></i>
                        <a href="/run/user/@item.Uid">@item.Spare3</a>
                        <small class="ml-sm-3 text-muted">@item.RunCreateTime.Value.ToString("yyyy-MM-dd")</small>
                        <small class="ml-sm-3 text-muted">@item.RunRemark</small>
                    </div>
                </div>
            </div>
        }
    </div>
</div>
<partial name="_PartialPaging4" model="Model" />